import request from '../utils/request'

export const getIdByName = (params: {username: string, password: string}) => {
  return request({
    url: `/admin-api/system/agent/auth/get-id-by-name`,
    method: 'get',
    params
  })
}

export const login = (data: {username: string, password: string}, tenantId:number) => {
  return request({
    url: `/admin-api/system/agent/auth/login`,
    method: 'post',
    data,
    headers: {
      'Tenant-Id': tenantId
    }
  })
}


export const getPermissionInfo = () => {
  return request({
    url: `/admin-api/system/agent/auth/get-permission-info`,
    method: 'get',
  })
}